var e = require("../../../uv-ui-tools/libs/mixin/mpMixin.js"), i = require("../../../uv-ui-tools/libs/mixin/mixin.js"), t = require("./props.js"), n = require("../../../../common/vendor.js");

require("../../../uv-ui-tools/libs/function/index.js"), require("../../../uv-ui-tools/libs/function/test.js"), 
require("../../../uv-ui-tools/libs/function/digit.js"), require("../../../uv-ui-tools/libs/util/route.js"), 
require("../../../uv-ui-tools/libs/function/debounce.js"), require("../../../uv-ui-tools/libs/function/throttle.js");

var r = {
    name: "uv-keyboard",
    mixins: [ e.mpMixin, i.mixin, t.props ],
    emits: [ "backspace", "change", "changeCarInputMode" ],
    data: function() {
        return {
            abc: !1
        };
    },
    computed: {
        areaList: function() {
            var e = [ "京", "沪", "粤", "津", "冀", "豫", "云", "辽", "黑", "湘", "皖", "鲁", "苏", "浙", "赣", "鄂", "桂", "甘", "晋", "陕", "蒙", "吉", "闽", "贵", "渝", "川", "青", "琼", "宁", "挂", "藏", "港", "澳", "新", "使", "学" ], i = [];
            return this.random && (e = this.$uv.randomArray(e)), i[0] = e.slice(0, 10), i[1] = e.slice(10, 20), 
            i[2] = e.slice(20, 30), i[3] = e.slice(30, 36), i;
        },
        engKeyBoardList: function() {
            var e = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Z", "X", "C", "V", "B", "N", "M" ], i = [];
            return this.random && (e = this.$uv.randomArray(e)), i[0] = e.slice(0, 10), i[1] = e.slice(10, 20), 
            i[2] = e.slice(20, 30), i[3] = e.slice(30, 36), i;
        },
        isDisabled: function(e, i) {
            var t = this;
            return function(e, i) {
                var n;
                return n = t.abc ? t.engKeyBoardList[e][i] : t.areaList[e][i], t.disKeys.indexOf(n) > -1;
            };
        }
    },
    methods: {
        carInputClick: function(e, i) {
            var t = this;
            if (!this.isDisabled(e, i)) {
                var n;
                n = this.abc ? this.engKeyBoardList[e][i] : this.areaList[e][i], !this.abc && this.autoChange && this.$uv.sleep(200).then(function() {
                    return t.abc = !0;
                }), this.$emit("change", n);
            }
        },
        changeCarInputMode: function() {
            this.abc = !this.abc, this.$emit("changeCarInputMode", this.abc);
        },
        backspaceClick: function() {
            var e = this;
            this.$emit("backspace"), clearInterval(this.timer), this.timer = null, this.timer = setInterval(function() {
                e.$emit("backspace");
            }, 250);
        },
        clearTimer: function() {
            clearInterval(this.timer), this.timer = null;
        }
    }
};

Array || n.resolveComponent("uv-icon")(), Math;

var a = n._export_sfc(r, [ [ "render", function(e, i, t, r, a, s) {
    return {
        a: n.f(a.abc ? s.engKeyBoardList : s.areaList, function(i, t, r) {
            return n.e({
                a: 3 === t
            }, 3 === t ? n.e({
                b: !e.customabc
            }, e.customabc ? {} : {
                c: n.n(!a.abc && "uv-keyboard__button__inner-wrapper__left__lang--active"),
                d: n.n(a.abc && "uv-keyboard__button__inner-wrapper__left__lang--active")
            }, {
                e: n.o(function() {
                    return s.changeCarInputMode && s.changeCarInputMode.apply(s, arguments);
                }, t)
            }) : {}, {
                f: n.f(i, function(e, i, r) {
                    return n.e({
                        a: n.t(e),
                        b: n.n({
                            "uv-keyboard__button__inner-wrapper__inner--disabled": s.isDisabled(t, i)
                        }),
                        c: n.o(function(e) {
                            return s.carInputClick(t, i);
                        }, i),
                        d: s.isDisabled(t, i) ? "none" : "uv-hover-class",
                        e: s.isDisabled(t, i)
                    }, (s.isDisabled(t, i), {}), {
                        f: i
                    });
                }),
                g: 3 === t
            }, 3 === t ? {
                h: "02695f75-0-" + r,
                i: n.p({
                    size: "28",
                    name: "backspace",
                    color: "#303133"
                }),
                j: n.o(function() {
                    return s.backspaceClick && s.backspaceClick.apply(s, arguments);
                }, t),
                k: n.o(function() {
                    return s.clearTimer && s.clearTimer.apply(s, arguments);
                }, t)
            } : {}, {
                l: t,
                m: t,
                n: n.n(t + 1 === 4 && "uv-keyboard__button--center")
            });
        }),
        b: n.o(function() {
            return e.noop && e.noop.apply(e, arguments);
        })
    };
} ], [ "__scopeId", "data-v-02695f75" ] ]);

wx.createComponent(a);